/**
 * 〈〉
 *
 * @author 王青杰
 * @create 2018-08-0810:25
 * @since 1.0.0
 */
package org.wlgzs.website.wlgzsoffice.controller.checkingin;

import org.hibernate.validator.internal.engine.ValueContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.wlgzs.website.wlgzsoffice.entity.TbAttendance;
import org.wlgzs.website.wlgzsoffice.service.AttendanceService;
import org.wlgzs.website.wlgzsoffice.util.ResultMsg;

import javax.annotation.Resource;

@Controller
@RequestMapping("checkingin/attendance")
public class AttendanceController {
    @Resource
    AttendanceService attendanceService;

    @RequestMapping(value = "/insert",method = RequestMethod.POST)
    public ResultMsg insert(TbAttendance attendance){
        return  attendanceService.insert(attendance);
    }

    @RequestMapping(value = "/delete",method = RequestMethod.POST)
    public ResultMsg delete(int attendanceId){
        return attendanceService.delete(attendanceId);
    }

    @RequestMapping(value = "/update",method = RequestMethod.POST)
    public ResultMsg update(TbAttendance attendance){
        return  attendanceService.update(attendance);
    }

    @RequestMapping(value = "/checkAll",method = RequestMethod.POST)
    public ResultMsg checkAll(int pageNum,TbAttendance attendance){
        return attendanceService.checkAll(pageNum,attendance);
    }

}
